package com.zhou.project.modules.activity.comment.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zhou.project.components.base.entity.Base;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Getter
@Setter
@TableName("ucc_activity_comment")
@ApiModel("[活动管理-评论管理-数据模型]")
public class ActivityComment extends Base {

    @ApiModelProperty(name = "userId",value = "用户id",required = true,dataType = "Int")
    @NotNull(message = "用户id不能为空")
    private Integer userId;

    /**活动id*/
    @ApiModelProperty(name = "activityId",value = "活动id",required = true,dataType = "Integer")
    @NotNull(message = "活动id不能为空")
    private Integer activityId;

    /**评论内容*/
    @ApiModelProperty(name = "commentText",value = "用户评论任容",required = true, dataType = "String")
    @NotBlank(message = "活动内容不能为空")
    @Length(min = 2,max = 100,message = "评论内容长度应为{min}-{max}之间")
    private String commentText;
}
